import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';

const TrackLocation = () => {
  const location = useLocation();

  useEffect(() => {
    console.log('Location changed:', location.pathname);
    localStorage.setItem('lastVisitedURL', location.pathname);
  }, [location]);

  return null;
};

export default TrackLocation;
